# Contributor: lemon <lemon@bitmessage.ch>
# Maintainer: lemon <lemon@bitmessage.ch>
pkgname=ii
pkgver=1.9
pkgrel=0
pkgdesc="Minimalist FIFO and filesystem-based IRC client"
url="https://tools.suckless.org/ii"
arch="all"
license="MIT"
options="!check" # upstream doesn't have a test suite
subpackages="$pkgname-doc"
source="https://dl.suckless.org/tools/$pkgname-$pkgver.tar.gz"

prepare() {
	default_prepare
	sed -i "$builddir/config.mk" \
		-e '/CFLAGS/{s/-Os //;s/=/+=/;s/-DNEED_STRLCPY //}' \
		-e '/LDFLAGS/{s/-s //;s/=/+=/}' \
		-e '/LIBS/{s/strlcpy.o//}'
}

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
}

sha512sums="
a665a6d1e1ffe56e370da2d703e677436ef4e18e763bb3cadbbf55e01812454ce4b79e8a20eda23846fdbe5a441ec8c534c9394995b3441472ce8a74c9035279  ii-1.9.tar.gz
"
